package com.mustafaiev.tair.cts.dao;

import java.util.List;

import com.mustafaiev.tair.cts.exeption.DataNotRemovedException;
import com.mustafaiev.tair.cts.exeption.DataNotRetrievedException;
import com.mustafaiev.tair.cts.exeption.DataNotStoredException;
import com.mustafaiev.tair.cts.model.Payer;

public interface IPayerDAO extends ICostTrackingSystemDAO<Payer> {

	/**
	 * Retrieves all payers from Database
	 * 
	 * @return
	 * @throws DataNotRetrievedException
	 */
	List<Payer> retrieveActivePayers() throws DataNotRetrievedException;

	/**
	 * Retrieves all active payers for group from Database
	 * 
	 * @param goupKey
	 * @return
	 * @throws DataNotRetrievedException
	 */
	List<Payer> retrieveActivePayersForGroup(final Long goupKey)
			throws DataNotRetrievedException;

	/**
	 * Retrieves payer by ID
	 * 
	 * @param payerId
	 * @return
	 * @throws DataNotRetrievedException
	 */
	Payer retrievePayer(Long payerId) throws DataNotRetrievedException;

	/**
	 * Finds active payer by email
	 * 
	 * @param email
	 * @return
	 * @throws DataNotRetrievedException
	 */
	Payer findActiveByEmail(String email) throws DataNotRetrievedException;

	/**
	 * Finds payer by email
	 * 
	 * @param email
	 * @return
	 * @throws DataNotRetrievedException
	 */
	Payer findByEmail(String email) throws DataNotRetrievedException;

	/**
	 * Deletes batch of passed objects
	 * 
	 * @param objects
	 */
	void deleteBatch(List<Payer> objectId) throws DataNotRemovedException;

	/**
	 * Retrieves payer by email
	 * 
	 * @param email
	 * @return Payer
	 * @throws DataNotRetrievedException
	 */
	Payer retrieveByEmail(String email) throws DataNotRetrievedException;

	/**
	 * Resets password for payer
	 * 
	 * @param payer
	 * @param password
	 * @throws DataNotStoredException
	 */
	void resetPassword(Payer payer, String password)
			throws DataNotStoredException;

}
